<?php

namespace App\Model;


use App\Common\SysContext;
use App\ModelBase\__t_a_cashbook_record;

class t_a_cashbook_record extends __t_a_cashbook_record
{
    static public function funcGetEntityByKey($key)
    {
        $arr = SysContext::funcInsStatic()->db()
            ->where('cashrec_x_id', SysContext::funcInsStatic()->funcGetX())
            ->where('cashrec_key', $key)
            ->getOne(t_a_cashbook_record::table());

        $entity = t_a_cashbook_record::funcArrayToEntity($arr);


        return $entity;
    }
}